﻿/**
 * ...
 * @author sminutoli
 */
import com.dmotiko.prune.*
import com.dmotiko.general.*
 
class ContactoBar extends SiteBar
{
	
	private function initClip():Void {
		super.initClip();
		sLink = "ContactoBtn";
		setData( [ 
			{ label: "ATENCION AL CLIENTE", value: SiteSections.CONTACT_ATEN }, 
			{ label: "RECURSOS HUMANOS", value: SiteSections.CONTACT_RRHH },
			{ label: "FRANQUICIAS", value: SiteSections.CONTACT_FRAN },
			{ label: "IMAGEN Y COMUNICACION", value: SiteSections.CONTACT_IMG }
		] );
	}
	
	private function section_changed(e):Void {
		if ( e.section.indexOf(SiteSections.CONTACT) > -1 ) {
			getBtnByValue( e.section ).onRelease();
			show();
		} else {
			hide();
		}
	}
	
	private function btn_changed( e ):Void 
	{
		super.btn_changed(e);		
		dispatchEvent( { type: BaseClipEvent.CHANGED, target: this, value: e.target.getData().value } );
	}
	
}